package com.doradance.app.home;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.doradance.R;
import com.doradance.account.utils.FragmentUtils;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

public class HotActivityActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initToolsBar();
        HotActivityFragment hotActivityFragment = new HotActivityFragment();
        FragmentUtils.addFirstFragment(getSupportFragmentManager(),R.id.fl_activity,hotActivityFragment);
    }

    private void initToolsBar() {
        setTitle(getString(R.string.hot_activity));
        getCustomToolbar().addLeftImageButton(R.mipmap.back, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    public View createDataView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.activity_hot_activity,null);
    }

    public static void start(Activity activity){
        Intent intent = new Intent(activity, HotActivityActivity.class);
        activity.startActivity(intent);
    }
}
